import service from "@/api/index.js";

const reserveApi = {
    getAll(params){
       return  service.get('/reserve',{params}).then(resp=>resp.data)
    },
    add(reserve){
        return service.post('/reserve',reserve).then(resp=>resp.data)
    },
    edit(reserve){
        return service.put('/reserve',reserve).then(resp=>resp.data)
    },
    attendance(cid,mid){
        return service.get('/reserve/attendance',{params:{cid:cid,mid:mid}}).then(resp=>resp.data)
    },
    delete(cid,mid){
        return service.get('/reserve/delete',{params:{cid:cid,mid:mid}}).then(resp=>resp.data)
    },
    cancel(reserve){
        return service.put('/reserve/cancel',reserve).then(resp=>resp.data)
    }
}
export default reserveApi